/**
* 轮播
*/
<template>
	<view>
		<swiper class="screen-swiper" :class="dotStyle?'square-dot':'round-dot'" :indicator-dots="true" :circular="true"
		 :autoplay="true" interval="5000" duration="500">
			<swiper-item v-for="(item,index) in swiperList" :key="index" @click="jump_to(item.jump_to)">
				<image :src="item.url" mode="aspectFill" v-if="item.type=='image'"></image>
				<video :src="item.url" autoplay loop muted :show-play-btn="false" :controls="false" objectFit="cover" v-if="item.type=='video'"></video>
			</swiper-item>
		</swiper>
	</view>
</template>

<script>
	export default {
		name: 'Rotation',
		props: ['dat'],
		data() {
			return {
				cardCur: 0,
				swiperList: this.dat,
				dotStyle: false,
				towerStart: 0,
				direction: ''
			};
		},
		methods: {
			jump_to(url) {
				uni.navigateTo({
					url: url,
					animationType: 'slide-in-left'
				});
			}


		}


	}
</script>

<style>
	.screen-swiper {
		width: 100vw;
	}

	.tower-swiper .tower-item {
		transform: scale(calc(0.5 + var(--index) / 10));
		margin-left: calc(var(--left) * 100upx - 150upx);
		z-index: var(--index);
	}
</style>
